<style>
#artikli_grupe table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#artikli_grupe table td input[type=button]{
	width:16px;
	height:16px;
	padding:0px;
	background-color:transparent;
	border:none;
	margin:0px 2px;
	cursor:pointer;
}
#artikli_grupe table td input[type=button]:hover{
	background-color:#fff;
}
</style>
<div class="area" id="artikli_grupe">
	<h2>Grupe artikala</h2>
	<input type="button" class="refresh" value="osveži" onclick="LoadRSDoc('artikli.php?a=artikli_grupe','setContent')" />
	<input type="button" class="novi" value="nova grupa" onclick="var nn=trim(prompt('Naziv grupe:')); if(nn.length){LoadRSDoc('artikli.php?a=artikli_grupe&mod=save&name='+escape(nn),'afterSaveArtiklGroup')}" /><br clear="all" />
	<table>
		<tr class="head">
			<td>šifra</td>
			<td>naziv</td>
			<td></td>
		</tr>
		{{%loop start group_id}}
		<tr>
			<td>{{$group_id}}</td>
			<td>{{$group_name}}</td>
			<td>
				<input title="izmeni" type="button" class="edit" onclick="var nn=trim(prompt('Novi naziv za grupu #{{$group_id}}&nbsp({{$group_name}})','{{$group_name}}')); if(nn.length){LoadRSDoc('artikli.php?a=artikli_grupe&mod=save&id={{$group_id}}&name='+escape(nn),'afterSaveArtiklGroup')}" />
				<input title="obriši" type="button" class="delete" onclick="if(confirm('Da li želite da obrišete grupu \'{{$group_name}}\'?')){LoadRSDoc('artikli.php?a=artikli_grupe&mod=delete&id={{$group_id}}','afterSaveArtiklGroup')}" />
			</td>
		</tr>
		{{%loop end}}
	</table>
</div>